
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        报修编辑
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/main.css" media="all">
    <style>
        .imgs{display: none;}
    </style>
</head>
<body>

<div class="x-body">
    <form class="layui-form layui-form-pane" action="${pageContext.request.contextPath}/repair/edit" >
        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
            <div class="layui-tab-content" >
                <div class="layui-tab-item layui-show">
                    <input type="hidden" name="id" value="${maps.repair.id}">
<%--                    <div class="layui-form-item">--%>
<%--                        <label class="layui-form-label">--%>
<%--                            <span class='x-red'>*</span>所属小区--%>
<%--                        </label>--%>
<%--                        <div class="layui-input-block">--%>
<%--                            <select name="cid"  placeholder="请选择小区">--%>
<%--                                <c:forEach items="${maps.communities}" var="community" >--%>
<%--                                <option value="${community.id}"--%>
<%--                                        <c:if test="${maps.repair.id==p.id&&community.id}">selected</c:if>--%>
<%--                                >${community.name}</option>--%>
<%--                                </c:forEach>--%>
<%--                            </select>--%>
<%--                        </div>--%>
<%--                    </div>--%>
                    <div class="layui-form-item">
                        <label class="layui-form-label">
                            <span class='x-red'>*</span>报修人员
                        </label>
                        <div class="layui-input-block">
                            <select name="pid"  placeholder="请选择报修人员">
                                <c:forEach items="${maps.personnels}" var="personnel" >
                                    <option value="${personnel.id}" <c:if test="${maps.repair.pid==personnel.id}">selected</c:if>>${personnel.name}</option>
                                </c:forEach>
                            </select>
                        </div>
                    </div>
    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">
                            <span class='x-red'>*</span>报修名称
                        </label>
                        <div class="layui-input-inline">
                            <select name="did"  placeholder="请选择报修名称">
                                <c:forEach items="${maps.devices}" var="device" >
                                    <option value="${device.id}" <c:if test="${maps.repair.did==device.id}">selected</c:if>>${device.name}</option>
                                </c:forEach>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">
                            <span class='x-red'>*</span>状态
                        </label>
                        <div class="layui-input-block">
                            <input type="radio" name="state" value="1" <c:if test="${maps.repair.state}">checked</c:if>  title="待受理" >
                            <div class="layui-unselect layui-form-radio layui-form-radioed"><i class="layui-anim layui-icon layui-anim-scaleSpring"></i>
                                <div>待受理</div>
                            </div>
                            <input type="radio" name="state" value="0" <c:if test="${!maps.repair.state}">checked</c:if> title="已受理">
                            <div class="layui-unselect layui-form-radio"><i class="layui-anim layui-icon"></i>
                                <div>已受理</div>
                            </div>
                        </div>

                    </div>
                    <div class="layui-form-item layui-form-text">
                        <label class="layui-form-label">
                            <span class='x-red'>*</span>报修描述
                        </label>
                        <div class="layui-input-block">
                            <textarea placeholder="请输入内容" name="repairComment" class="layui-textarea" required>${maps.repair.repairComment}</textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <button class="layui-btn" type="submit" lay-filter="add" lay-submit="">
                            更改
                        </button>
                    </div>
                    <!--</form>-->
                    <div style="height:100px;"></div>
                </div>
            </div>
        </div>
    </form>
</div>
<script src="${pageContext.request.contextPath}/lib/layui/layui.js" charset="utf-8"></script>
<script src="${pageContext.request.contextPath}/js/x-layui.js" charset="utf-8"></script>
<script>
    layui.use(['laydate','element','layer','form'], function(){
        form = layui.form();
        laydate = layui.laydate;//日期插件
    })
</script>
</body>
</html>